import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/service-user/user/login',
    method: 'post',
    headers: { 'Authorization': 'Basic d3d3LmFsaXNscy5jb206MTIzNDU2' }, // TODO www.alisls.com
    // headers: { 'Authorization': 'Basic d3d3LnNoZXF1dGFvLmNvbToxMjM0NTY=' }, // TODO manage.shequtao.com
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/service-user/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/service-user/user/logout',
    method: 'post'
  })
}
